import { BaseBeanData, BaseRuleBeanData } from '@/model/base/baseModel'

export interface RouterBeanData extends BaseBeanData {
  path: string;
  fullPath: string;
  name: string;
  title: string;
  component: string;
  redirect: string;
  children: Array<RouterBeanData>;
}

export interface RouterList {
  list: Array<RouterBeanData>;
  total: number
}

export const RuleBeanData = {
  ...BaseRuleBeanData,
  path: '',
  fullPath: '',
  name: '',
  title: '',
  component: '',
  redirect: ''
}

export const FORM_RULES = ({
  title: [{ required: true, message: '请输入tab名称', trigger: 'change' }],
  path: [{ required: true, message: '请输入路由路径', trigger: 'change' }],
  name: [{ required: true, message: '请输入路由名称', trigger: 'change' }],
  component: [{ required: true, message: '请输入组件地址', trigger: 'change' }]
})
